using CustomORM.Examples.Entities;
using CustomORM.Mapping;
using FluentNHibernate.Mapping;

namespace CustomORM.Examples.MappingRepository
{
    class OrderMapNh : ClassMap<NhOrder>
    {
        public OrderMapNh()
        {
            Table("Orders");
            Id(x => x.OrderID, "`Order ID`")
                .GeneratedBy.Assigned();
            Map(x => x.CustomerID, "`Customer ID`");
            //Map(x => x.OrderDate, "`Order Date`");
            // cyclic dependencies not supported for now
            //References(x => x.Customer, "CustomerID");
            References(x => x.Employee, "`Employee ID`");
        }
    }
}